package com.csx.micrometer.demo.consumer.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author cuisongxu
 * @date 2022/12/4 10:09
 */
@Configuration
public class InvokeConfiguration {

    @Bean
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

    @LoadBalanced
    @Bean(name = "restTemplateLoadBalancer")
    public RestTemplate restTemplateLoadBalancer() {
        return new RestTemplate();
    }
}
